package com.eshop.modules.template.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

@TableName("shipping_templates_region")
public class ShippingTemplatesRegion implements Serializable
{
    @TableId
    private Integer id;
    @NotNull
    private Integer provinceId;
    @NotNull
    private Integer tempId;
    @NotNull
    private Integer cityId;
    @NotNull
    private BigDecimal first;
    @NotNull
    private BigDecimal firstPrice;
    @NotNull
    private BigDecimal continues;
    @NotNull
    private BigDecimal continuePrice;
    @NotNull
    private Integer type;
    @NotBlank
    private String uniqid;
    
    public void copy(final ShippingTemplatesRegion source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public static ShippingTemplatesRegionBuilder builder() {
        return new ShippingTemplatesRegionBuilder();
    }
    
    public ShippingTemplatesRegion(final Integer id, final Integer provinceId, final Integer tempId, final Integer cityId, final BigDecimal first, final BigDecimal firstPrice, final BigDecimal continues, final BigDecimal continuePrice, final Integer type, final String uniqid) {
        this.id = id;
        this.provinceId = provinceId;
        this.tempId = tempId;
        this.cityId = cityId;
        this.first = first;
        this.firstPrice = firstPrice;
        this.continues = continues;
        this.continuePrice = continuePrice;
        this.type = type;
        this.uniqid = uniqid;
    }
    
    public ShippingTemplatesRegion() {
    }
    
    public Integer getId() {
        return this.id;
    }
    
    public Integer getProvinceId() {
        return this.provinceId;
    }
    
    public Integer getTempId() {
        return this.tempId;
    }
    
    public Integer getCityId() {
        return this.cityId;
    }
    
    public BigDecimal getFirst() {
        return this.first;
    }
    
    public BigDecimal getFirstPrice() {
        return this.firstPrice;
    }
    
    public BigDecimal getContinues() {
        return this.continues;
    }
    
    public BigDecimal getContinuePrice() {
        return this.continuePrice;
    }
    
    public Integer getType() {
        return this.type;
    }
    
    public String getUniqid() {
        return this.uniqid;
    }
    
    public void setId(final Integer id) {
        this.id = id;
    }
    
    public void setProvinceId(final Integer provinceId) {
        this.provinceId = provinceId;
    }
    
    public void setTempId(final Integer tempId) {
        this.tempId = tempId;
    }
    
    public void setCityId(final Integer cityId) {
        this.cityId = cityId;
    }
    
    public void setFirst(final BigDecimal first) {
        this.first = first;
    }
    
    public void setFirstPrice(final BigDecimal firstPrice) {
        this.firstPrice = firstPrice;
    }
    
    public void setContinues(final BigDecimal continues) {
        this.continues = continues;
    }
    
    public void setContinuePrice(final BigDecimal continuePrice) {
        this.continuePrice = continuePrice;
    }
    
    public void setType(final Integer type) {
        this.type = type;
    }
    
    public void setUniqid(final String uniqid) {
        this.uniqid = uniqid;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof ShippingTemplatesRegion)) {
            return false;
        }
        final ShippingTemplatesRegion other = (ShippingTemplatesRegion)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$provinceId = this.getProvinceId();
        final Object other$provinceId = other.getProvinceId();
        Label_0102: {
            if (this$provinceId == null) {
                if (other$provinceId == null) {
                    break Label_0102;
                }
            }
            else if (this$provinceId.equals(other$provinceId)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$tempId = this.getTempId();
        final Object other$tempId = other.getTempId();
        Label_0139: {
            if (this$tempId == null) {
                if (other$tempId == null) {
                    break Label_0139;
                }
            }
            else if (this$tempId.equals(other$tempId)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$cityId = this.getCityId();
        final Object other$cityId = other.getCityId();
        Label_0176: {
            if (this$cityId == null) {
                if (other$cityId == null) {
                    break Label_0176;
                }
            }
            else if (this$cityId.equals(other$cityId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        Label_0213: {
            if (this$type == null) {
                if (other$type == null) {
                    break Label_0213;
                }
            }
            else if (this$type.equals(other$type)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$first = this.getFirst();
        final Object other$first = other.getFirst();
        Label_0250: {
            if (this$first == null) {
                if (other$first == null) {
                    break Label_0250;
                }
            }
            else if (this$first.equals(other$first)) {
                break Label_0250;
            }
            return false;
        }
        final Object this$firstPrice = this.getFirstPrice();
        final Object other$firstPrice = other.getFirstPrice();
        Label_0287: {
            if (this$firstPrice == null) {
                if (other$firstPrice == null) {
                    break Label_0287;
                }
            }
            else if (this$firstPrice.equals(other$firstPrice)) {
                break Label_0287;
            }
            return false;
        }
        final Object this$continues = this.getContinues();
        final Object other$continues = other.getContinues();
        Label_0324: {
            if (this$continues == null) {
                if (other$continues == null) {
                    break Label_0324;
                }
            }
            else if (this$continues.equals(other$continues)) {
                break Label_0324;
            }
            return false;
        }
        final Object this$continuePrice = this.getContinuePrice();
        final Object other$continuePrice = other.getContinuePrice();
        Label_0361: {
            if (this$continuePrice == null) {
                if (other$continuePrice == null) {
                    break Label_0361;
                }
            }
            else if (this$continuePrice.equals(other$continuePrice)) {
                break Label_0361;
            }
            return false;
        }
        final Object this$uniqid = this.getUniqid();
        final Object other$uniqid = other.getUniqid();
        if (this$uniqid == null) {
            if (other$uniqid == null) {
                return true;
            }
        }
        else if (this$uniqid.equals(other$uniqid)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof ShippingTemplatesRegion;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $provinceId = this.getProvinceId();
        result = result * 59 + (($provinceId == null) ? 43 : $provinceId.hashCode());
        final Object $tempId = this.getTempId();
        result = result * 59 + (($tempId == null) ? 43 : $tempId.hashCode());
        final Object $cityId = this.getCityId();
        result = result * 59 + (($cityId == null) ? 43 : $cityId.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        final Object $first = this.getFirst();
        result = result * 59 + (($first == null) ? 43 : $first.hashCode());
        final Object $firstPrice = this.getFirstPrice();
        result = result * 59 + (($firstPrice == null) ? 43 : $firstPrice.hashCode());
        final Object $continues = this.getContinues();
        result = result * 59 + (($continues == null) ? 43 : $continues.hashCode());
        final Object $continuePrice = this.getContinuePrice();
        result = result * 59 + (($continuePrice == null) ? 43 : $continuePrice.hashCode());
        final Object $uniqid = this.getUniqid();
        result = result * 59 + (($uniqid == null) ? 43 : $uniqid.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "ShippingTemplatesRegion(id=" + this.getId() + ", provinceId=" + this.getProvinceId() + ", tempId=" + this.getTempId() + ", cityId=" + this.getCityId() + ", first=" + this.getFirst() + ", firstPrice=" + this.getFirstPrice() + ", continues=" + this.getContinues() + ", continuePrice=" + this.getContinuePrice() + ", type=" + this.getType() + ", uniqid=" + this.getUniqid() + ")";
    }
    
    public static class ShippingTemplatesRegionBuilder
    {
        private Integer id;
        private Integer provinceId;
        private Integer tempId;
        private Integer cityId;
        private BigDecimal first;
        private BigDecimal firstPrice;
        private BigDecimal continues;
        private BigDecimal continuePrice;
        private Integer type;
        private String uniqid;
        
        ShippingTemplatesRegionBuilder() {
        }
        
        public ShippingTemplatesRegionBuilder id(final Integer id) {
            this.id = id;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder provinceId(final Integer provinceId) {
            this.provinceId = provinceId;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder tempId(final Integer tempId) {
            this.tempId = tempId;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder cityId(final Integer cityId) {
            this.cityId = cityId;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder first(final BigDecimal first) {
            this.first = first;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder firstPrice(final BigDecimal firstPrice) {
            this.firstPrice = firstPrice;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder continues(final BigDecimal continues) {
            this.continues = continues;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder continuePrice(final BigDecimal continuePrice) {
            this.continuePrice = continuePrice;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder type(final Integer type) {
            this.type = type;
            return this;
        }
        
        public ShippingTemplatesRegionBuilder uniqid(final String uniqid) {
            this.uniqid = uniqid;
            return this;
        }
        
        public ShippingTemplatesRegion build() {
            return new ShippingTemplatesRegion(this.id, this.provinceId, this.tempId, this.cityId, this.first, this.firstPrice, this.continues, this.continuePrice, this.type, this.uniqid);
        }
        
        @Override
        public String toString() {
            return "ShippingTemplatesRegion.ShippingTemplatesRegionBuilder(id=" + this.id + ", provinceId=" + this.provinceId + ", tempId=" + this.tempId + ", cityId=" + this.cityId + ", first=" + this.first + ", firstPrice=" + this.firstPrice + ", continues=" + this.continues + ", continuePrice=" + this.continuePrice + ", type=" + this.type + ", uniqid=" + this.uniqid + ")";
        }
    }
}
